3.452 \(\int (a+b \sec ^3(e+f x)) \tan ^5(e+f x) \, dx\)

Optimal. Leaf size=92 \[ \frac{a \sec ^4(e+f x)}{4 f}-\frac{a \sec ^2(e+f x)}{f}-\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^7(e+f x)}{7 f}-\frac{2 b \sec ^5(e+f x)}{5 f}+\frac{b \sec ^3(e+f x)}{3 f} \]

[Out]

-((a*Log[Cos[e + f*x]])/f) - (a*Sec[e + f*x]^2)/f + (b*Sec[e + f*x]^3)/(3*f) + (a*Sec[e + f*x]^4)/(4*f) - (2*b
*Sec[e + f*x]^5)/(5*f) + (b*Sec[e + f*x]^7)/(7*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0689336, antiderivative size = 92, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4138, 1802} \[ \frac{a \sec ^4(e+f x)}{4 f}-\frac{a \sec ^2(e+f x)}{f}-\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^7(e+f x)}{7 f}-\frac{2 b \sec ^5(e+f x)}{5 f}+\frac{b \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^3)*Tan[e + f*x]^5,x]

[Out]

-((a*Log[Cos[e + f*x]])/f) - (a*Sec[e + f*x]^2)/f + (b*Sec[e + f*x]^3)/(3*f) + (a*Sec[e + f*x]^4)/(4*f) - (2*b
*Sec[e + f*x]^5)/(5*f) + (b*Sec[e + f*x]^7)/(7*f)

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin{align*} \int \left (a+b \sec ^3(e+f x)\right ) \tan ^5(e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2 \left (b+a x^3\right )}{x^8} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{b}{x^8}-\frac{2 b}{x^6}+\frac{a}{x^5}+\frac{b}{x^4}-\frac{2 a}{x^3}+\frac{a}{x}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a \log (\cos (e+f x))}{f}-\frac{a \sec ^2(e+f x)}{f}+\frac{b \sec ^3(e+f x)}{3 f}+\frac{a \sec ^4(e+f x)}{4 f}-\frac{2 b \sec ^5(e+f x)}{5 f}+\frac{b \sec ^7(e+f x)}{7 f}\\ \end{align*}

Mathematica [A]  time = 0.270366, size = 87, normalized size = 0.95 \[ -\frac{a \left (-\tan ^4(e+f x)+2 \tan ^2(e+f x)+4 \log (\cos (e+f x))\right )}{4 f}+\frac{b \sec ^7(e+f x)}{7 f}-\frac{2 b \sec ^5(e+f x)}{5 f}+\frac{b \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^3)*Tan[e + f*x]^5,x]

[Out]

(b*Sec[e + f*x]^3)/(3*f) - (2*b*Sec[e + f*x]^5)/(5*f) + (b*Sec[e + f*x]^7)/(7*f) - (a*(4*Log[Cos[e + f*x]] + 2
*Tan[e + f*x]^2 - Tan[e + f*x]^4))/(4*f)

________________________________________________________________________________________

Maple [B]  time = 0.054, size = 183, normalized size = 2. \begin{align*}{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{4}a}{4\,f}}-{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}a}{2\,f}}-{\frac{a\ln \left ( \cos \left ( fx+e \right ) \right ) }{f}}+{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{6}}{7\,f \left ( \cos \left ( fx+e \right ) \right ) ^{7}}}+{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{6}}{35\,f \left ( \cos \left ( fx+e \right ) \right ) ^{5}}}-{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{6}}{105\,f \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}+{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{6}}{35\,f\cos \left ( fx+e \right ) }}+{\frac{8\,b\cos \left ( fx+e \right ) }{105\,f}}+{\frac{b\cos \left ( fx+e \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{35\,f}}+{\frac{4\,b\cos \left ( fx+e \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{105\,f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x)

[Out]

1/4/f*tan(f*x+e)^4*a-1/2/f*a*tan(f*x+e)^2-a*ln(cos(f*x+e))/f+1/7/f*b*sin(f*x+e)^6/cos(f*x+e)^7+1/35/f*b*sin(f*
x+e)^6/cos(f*x+e)^5-1/105/f*b*sin(f*x+e)^6/cos(f*x+e)^3+1/35/f*b*sin(f*x+e)^6/cos(f*x+e)+8/105/f*b*cos(f*x+e)+
1/35/f*b*cos(f*x+e)*sin(f*x+e)^4+4/105/f*b*cos(f*x+e)*sin(f*x+e)^2

________________________________________________________________________________________

Maxima [A]  time = 0.994856, size = 99, normalized size = 1.08 \begin{align*} -\frac{420 \, a \log \left (\cos \left (f x + e\right )\right ) + \frac{420 \, a \cos \left (f x + e\right )^{5} - 140 \, b \cos \left (f x + e\right )^{4} - 105 \, a \cos \left (f x + e\right )^{3} + 168 \, b \cos \left (f x + e\right )^{2} - 60 \, b}{\cos \left (f x + e\right )^{7}}}{420 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x, algorithm="maxima")

[Out]

-1/420*(420*a*log(cos(f*x + e)) + (420*a*cos(f*x + e)^5 - 140*b*cos(f*x + e)^4 - 105*a*cos(f*x + e)^3 + 168*b*
cos(f*x + e)^2 - 60*b)/cos(f*x + e)^7)/f

________________________________________________________________________________________

Fricas [A]  time = 0.543684, size = 227, normalized size = 2.47 \begin{align*} -\frac{420 \, a \cos \left (f x + e\right )^{7} \log \left (-\cos \left (f x + e\right )\right ) + 420 \, a \cos \left (f x + e\right )^{5} - 140 \, b \cos \left (f x + e\right )^{4} - 105 \, a \cos \left (f x + e\right )^{3} + 168 \, b \cos \left (f x + e\right )^{2} - 60 \, b}{420 \, f \cos \left (f x + e\right )^{7}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x, algorithm="fricas")

[Out]

-1/420*(420*a*cos(f*x + e)^7*log(-cos(f*x + e)) + 420*a*cos(f*x + e)^5 - 140*b*cos(f*x + e)^4 - 105*a*cos(f*x
+ e)^3 + 168*b*cos(f*x + e)^2 - 60*b)/(f*cos(f*x + e)^7)

________________________________________________________________________________________

Sympy [A]  time = 16.7713, size = 119, normalized size = 1.29 \begin{align*} \begin{cases} \frac{a \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{a \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac{a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac{b \tan ^{4}{\left (e + f x \right )} \sec ^{3}{\left (e + f x \right )}}{7 f} - \frac{4 b \tan ^{2}{\left (e + f x \right )} \sec ^{3}{\left (e + f x \right )}}{35 f} + \frac{8 b \sec ^{3}{\left (e + f x \right )}}{105 f} & \text{for}\: f \neq 0 \\x \left (a + b \sec ^{3}{\left (e \right )}\right ) \tan ^{5}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**3)*tan(f*x+e)**5,x)

[Out]

Piecewise((a*log(tan(e + f*x)**2 + 1)/(2*f) + a*tan(e + f*x)**4/(4*f) - a*tan(e + f*x)**2/(2*f) + b*tan(e + f*
x)**4*sec(e + f*x)**3/(7*f) - 4*b*tan(e + f*x)**2*sec(e + f*x)**3/(35*f) + 8*b*sec(e + f*x)**3/(105*f), Ne(f,
0)), (x*(a + b*sec(e)**3)*tan(e)**5, True))

________________________________________________________________________________________

Giac [B]  time = 3.083, size = 495, normalized size = 5.38 \begin{align*} \frac{420 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) - 420 \, a \log \left ({\left | -\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1 \right |}\right ) + \frac{1089 \, a + 64 \, b + \frac{8463 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{448 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{28749 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{1344 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{51555 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac{2240 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac{51555 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac{4480 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac{28749 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} + \frac{8463 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} + \frac{1089 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{7}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{7}}}{{\left (\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}^{7}}}{420 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^5,x, algorithm="giac")

[Out]

1/420*(420*a*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1) - 420*a*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e)
 + 1) - 1)) + (1089*a + 64*b + 8463*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 448*b*(cos(f*x + e) - 1)/(cos(f*
x + e) + 1) + 28749*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 1344*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) +
1)^2 + 51555*a*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 2240*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 +
51555*a*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 4480*b*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 28749*a
*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 + 8463*a*(cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6 + 1089*a*(cos(f*
x + e) - 1)^7/(cos(f*x + e) + 1)^7)/((cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1)^7)/f